-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an EndpointProvider at Server side for CoAP based on java-coap(fork) #1382
Conversation
...ap-server/src/main/java/org/eclipse/leshan/transport/javacoap/resource/ResourcesService.java
Outdated
Show resolved
Hide resolved
...ver/src/main/java/org/eclipse/leshan/transport/javacoap/endpoint/JavaCoapServerEndpoint.java
Outdated
Show resolved
Hide resolved
...ver/src/main/java/org/eclipse/leshan/transport/javacoap/endpoint/JavaCoapServerEndpoint.java
Outdated
Show resolved
Hide resolved
...ver/src/main/java/org/eclipse/leshan/transport/javacoap/endpoint/JavaCoapServerEndpoint.java
Outdated
Show resolved
Hide resolved
...ver/src/main/java/org/eclipse/leshan/transport/javacoap/endpoint/JavaCoapServerEndpoint.java
Outdated
Show resolved
Hide resolved
...ain/java/org/eclipse/leshan/transport/javacoap/endpoint/JavaCoapServerEndpointsProvider.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public void stop() { | ||
// TODO in Leshan stop means "we can restart after a stop", so we should check what means stop for java-coap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no restart after stop, need to create new instance to start again.
Out of curiosity, what's the use case for restart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I'm not so sure if this is really needed, I know that we use it in some tests (especially at LWM2M client side to simulate that device is sleeping).
Californium has a start / stop / destroy mechanism where stop means that's you can restart unlike destroy.
Stop is kind of "pause".
As Leshan was strongly tied to californium, we follow this API.
Then when I did first transport abstraction layer, I keep it...
Always easier to add feature than remove it, but maybe better to just keep start() and destroy(). 🤔
...ver/src/main/java/org/eclipse/leshan/transport/javacoap/endpoint/JavaCoapServerEndpoint.java
Outdated
Show resolved
Hide resolved
@szysas thx a lot for reviewing this 😉 |
556c46f
to
8ef603e
Compare
6441d53
to
2d3717e
Compare
97827bb
to
51bc666
Compare
I finally succeed to pass all CoAP (only) integration tests with Californium used at LWM2M client side and java-coap at LWM2M server side. (Probably not exhaustive) Missing feature :
|
51bc666
to
ab207af
Compare
d07caf1
to
95860bd
Compare
I rebased this in master (several conflict especially because of Identity Refactoring)
|
✔️ Observe relation can now be shared / persisted, since we use java-coap v6.18.0. All integration test are OK ✔️, there are still some TODO in the code but I think this is now in a testable state. |
This is now integrated in java-coap endpoint is available in leshan-server-demo, see Server tab: The port and host can be configured with options:
|
This aims to experiment transport abstraction layer implementing another endpoint provider at Server side for CoAP based on java-coap(fork).
See more details at #1373.